package cn.lcvc.xnc.application.web.action.backstage.waste;
import cn.lcvc.xnc.application.common.model.result.ResponseData;
import cn.lcvc.xnc.application.model.WasteDisposalSite;
import cn.lcvc.xnc.application.model.query.WasteDisposalSiteQuery;
import cn.lcvc.xnc.application.service.WasteDisposalSiteService;
import cn.lcvc.xnc.authority.web.controller.backstage.BaseBackstageController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;

/**
 * 消纳场控制器
 *
 * @author 小锋
 * @date 2022/08/08
 */
@Api(tags = "后台的消纳场管理模块")
@RestController
@RequestMapping(value = "/api/backstage/waste/wastedisposalInfo")
public class WasteDisposalSiteController extends BaseBackstageController<WasteDisposalSite, WasteDisposalSiteQuery,Integer>{


    @Autowired
    private WasteDisposalSiteService baseService;
    @ApiOperation(value = "查询所有消纳场记录")
    @GetMapping("/all")
    @Override
    protected ResponseData query(WasteDisposalSiteQuery q) {
        return super.query(q);
    }

    @ApiOperation(value = "分页查询所有消纳场记录")
    @Override
    public ResponseData query(Integer page, Integer pageSize, WasteDisposalSiteQuery q){
        return super.query(page,pageSize,q);
    }

    @ApiOperation(value = "读取消纳场信息")
    @Override
    protected ResponseData get(@PathVariable("id") Integer id) {
        return super.get(id);
    }

    @ApiOperation(value = "批量删除指定的多个消纳场信息")
    @Override
    protected ResponseData deletes(@NotEmpty(message = "操作失败：请选择要移除的记录") Integer[] ids) {
        return super.deletes(ids);
    }


    @ApiOperation(value = "添加消纳场记录")
    @Override
    protected ResponseData add(@Valid @RequestBody WasteDisposalSite wasteDisposalInfo) {
        return super.add(wasteDisposalInfo);
    }

    @ApiOperation(value = "编辑消纳场记录")
    @Override
    protected ResponseData edit(@Valid @RequestBody WasteDisposalSite wasteDisposalInfo) {
        return super.edit(wasteDisposalInfo);
    }




}
